package com.syaccp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.syaccp.mapper.CustomerBillMapper;
import com.syaccp.model.CustomerBill;
import com.syaccp.request.CustomerDetailSelectRequest;
import com.syaccp.service.CustomerBillService;
import com.syaccp.utils.Result;
import org.springframework.stereotype.Service;

@Service
public class CustomerBillServiceImpl  extends ServiceImpl<CustomerBillMapper, CustomerBill> implements CustomerBillService {



    public Result findCustomerBill(CustomerDetailSelectRequest customerDetailSelectRequest){
        PageHelper.startPage(customerDetailSelectRequest.getPage(), customerDetailSelectRequest.getLimit());
        QueryWrapper qw=new QueryWrapper();
        qw.eq("customer_id", customerDetailSelectRequest.getId());



        PageInfo pageInfo = new PageInfo<>(this.baseMapper.selectList(qw));

        return Result.success(pageInfo);
    }


}
